<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
    <link rel="stylesheet" href="souye/css/login.css">
</head>

<body>
    <div class="login">
        <div class="sang">
            发电预测可视化系统
        </div>
        <div class="xia">
            <div class="zanghao">
                <input type="text" placeholder="请输入账号" id="zanghao">
            </div>
            <div class="mima">
                <input type="password" placeholder="请输入密码" id="mima">
            </div>
            <div class="denglu">
                登录
            </div>
        </div>
    </div>
</body>
<script>
    const anliu = document.querySelector('.denglu')
    const zanghao = document.querySelector('#zanghao')
    const mima = document.querySelector('#mima')
    anliu.addEventListener('click', function () {
        const value = zanghao.value
        const pad = mima.value
        if (value == 'suili111') {
            if (pad == '12345678') {
                console.log(1);
                location.href = 'souye/index.html'
            } else {
                alert('密码错误了偶 亲~~')
            }
        } else {
            alert('账号不存在偶 亲~~')
        }
    })
</script>

</html>